<div class="condition-container">
  <div class="ui-g ui-g-12 condition-title"><i class="fa fa-table"></i>{{report.reportName}}</div>
  <div class="condition-lists">
    <div class="ui-g ui-g-12 ui-fluid" *ngFor="let cond of conds">
      <div class="ui-g ui-g-3 condition-lable">{{cond.name}}</div>
      <div class="ui-g ui-g-3 condition-comparetors">
        <p-dropdown [style]="{'width': '100%'}" [options]="cond.comparetors" [(ngModel)]="cond.comparetor"
          optionLabel="label">
        </p-dropdown>
      </div>
      <div class="ui-g ui-g-6">
        <ng-container [ngSwitch]="cond.type">
          <ng-container *ngSwitchCase="'input'">
            <!-- 文本输入框 -->
            <div class="ui-g ui-g-12">
              <input type="text" pInputText [(ngModel)]="cond.value">
            </div>
            <div *ngIf="cond.comparetor && cond.comparetor.value == 'between'" class="ui-g ui-g-12"
              style="padding-top:10px;">
              <input type="text" pInputText [(ngModel)]="cond.value1">
            </div>
          </ng-container>
          <ng-container *ngSwitchCase="'dropdown'">
            <!-- 下拉列表 -->
            <p-dropdown [style]="{'width': '100%'}" [options]="cond.items" [(ngModel)]="cond.value" optionLabel="label"
              [showClear]="true"></p-dropdown>
          </ng-container>
          <ng-container *ngSwitchCase="'calendar'">
            <!-- 时间控件 -->
            <div class="ui-g ui-g-12">
              <p-calendar [style]="{'width': '100%'}" appendTo="body" [(ngModel)]="cond.value" [locale]="zh"
                dateFormat="yy年mm月dd日">
              </p-calendar>
            </div>
            <div *ngIf="cond.comparetor && cond.comparetor.value == 'between'" class="ui-g ui-g-12"
              style="padding-top:10px;">
              <p-calendar [style]="{'width': '100%'}" appendTo="body" [(ngModel)]="cond.value1" [locale]="zh" dateFormat="yy年mm月dd日">
              </p-calendar>
            </div>
          </ng-container>
        </ng-container>
      </div>
    </div>
  </div>
  <div class="ui-g ui-g-12 button-container">
    <button pButton type="button" label="重置" (click)="reset()" icon="fa fa-mail-reply"
      class="ui-button-raised ui-button-danger" style="margin-left: calc(100% - 180px)"></button>
    <button pButton type="button" label="&nbsp;&nbsp;查询" (click)="search()" icon="pi pi-search"
      class="ui-button-raised ui-button-success"></button>
  </div>
</div>